package com.zjweu.hkg.Servies;

import com.zjweu.hkg.POJO.Administrator;
import com.zjweu.hkg.POJO.Follow;
import com.zjweu.hkg.POJO.Result;
import com.zjweu.hkg.POJO.User;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserServices {

    User findUserByName(String userName);

    void register(String userName, String userPsd);

    Administrator findAdminByUserId(int userId);

    User[] getAllUser();

    int updateUserById(int id, String newName,int status);

    int deleteUserById(int id);

    User getUserById(int id);

    Result<String> updateUserAvatarUrlByUID(int id,String url);

    String createUserToken(User user);

    Result updateUserPsdById(int uid, String oldPassword, String newPassword);

    Result<String> updateAdminPermission(int uid, int newPermission);

    List<Administrator> getAllAdmin();

    Result<String> deleteAdminByAdminId(int adminId);

    Result<String> addNewAdminById(int uid,int permission);

    Result<String> follow(int followerId, int followedId);

    Result<String> unFollow(int followerId, int followedId);

    Result<String> isFollow(int followerId, int followedId);

    Result getFollowedByFollowerId(int followerId);

    Result getFollowerByFollowedId(int followedId);

    Result getFollowedUserObjByFollowerId(int followerId);
}
